﻿using System;
using System.Linq;
using tinfosvr.Models;
using log4net;
using Fleck;
using System.Collections.Generic;

namespace tinfosvr
{
    class Program
    {
        static void Main(string[] args)
        {
            TrainTimesUpdater.GetInstance().LoadData();
            TrainTimesUpdater.GetInstance().StartUpdate();
            TrainTimesServer trainTimesServer = new TrainTimesServer();
            trainTimesServer.Init();
            while (true)
            {
                Console.WriteLine("Press 'Q' or 'q' to exit.");
                string line = Console.ReadLine();
                if (line.Trim().ToUpper().Equals('Q'))
                {
                    break;
                }
            }

            trainTimesServer.dispose();
        }
    }
}
